<?php

    $cli = new swoole_redis;
    $cli->connect('127.0.0.1',6379,function($cli,$result){
            echo "connect".PHP_EOL;
            var_dump($result);
            $cli->set('emails',time(),function($cli,$res){
                echo "this is setting".PHP_EOL;
                var_dump($res);
            });

            $cli->get('emails',function($cli,$res){
                echo "this is getting key".PHP_EOL;
                var_dump($res);
            });

            $cli->keys('*',function($cli,$res){
                echo "get Keys".PHP_EOL;
                var_dump($res);
            });
            $cli->close();
    });